package com.webchat.chat.service;

import com.webchat.chat.core.Service;
import com.webchat.chat.core.baseEntity.Result;
import com.webchat.chat.model.SocketClient;
import com.webchat.chat.model.User;

import java.util.List;


/**
 * Created by admin on 2018-06-29.
 */
public interface UserService extends Service<User> {

    void addUser(User user, String[] roleIds);

    /**
     * 获取可用的客服
     * @param tenantCode
     * @return
     */
    List<SocketClient> getAvailableCS(String tenantCode);

    User findDetailById(String id);

    void updateUserAndRole(User user,String[] roleIds);

    Result checkUser(User user);

    List<User> findUserByInfo(User user);

    void updateUser(User user);

    void changeStatusOffline(String userId);

    Boolean ckeckAlreadyOnlineAndKickout(String userId);

    List<User> findAllByTenantCode();

}
